<script type="text/javascript">
                $(function(){
                   $('#coupon_sn').change(function(){
                       var coupon_sn = $('#coupon_sn').val();
                       if(coupon_sn == '')
                       {
						   $('.show-message').find('span').hide();
                           return;
                       }
                       $.getJSON("mobile/index.php?app=order&act=check_coupon", {coupon_sn: coupon_sn, store_id: '{$smarty.get.store_id}'}, function(data){
                           if(data['retval'])
                           {
                               $('.unusable').hide();
                               var msg = '{$lang.usable}';
                               var str = price_format(data['retval']['price']);
                               $('.usable').show().html(msg + str).css("display","inline-block");
                           }
                           else
                           {
                               $('.usable').hide();
                               $('.unusable').show().css("display","inline-block");
                               $('#coupon_sn').val('');
                           }
                       });
                   });
				   $('.make_sure .title').click(function(){
					   $(this).next().toggle();
					   $('.show-message').find('span').hide();
					   $("select[name='coupon_sn']")[0].selectedIndex=0;
					   $('#coupon_sn-button span').html('{$lang.pls_coupon}');
					});
               });
                </script>
<div class="make_sure">
	{if $goods_info.allow_coupon}<p class="title clearfix">使用优惠券</p>{/if}
	{if $goods_info.allow_coupon}
	<div style="display:none;" class="coupon-input hidden">
		<p class="wrap-model">
            <select id="coupon_sn"  name="coupon_sn" >
                 <option value="">{$lang.pls_coupon}</option>
                 <!--{foreach from=$coupon_list item=coupon}-->
                 <option value="{$coupon.coupon_sn}">SN:{$coupon.coupon_sn}</option>
                 <!--{/foreach}-->
            </select>
		</p>
	</div>
	<p class="show-message">
		<span style="display:none;" class="usable">{$lang.usable}</span> <span style="display:none;" class="unusable">{$lang.unusable}</span> 
	</p>
	{/if}
	<div class="bottom-background"></div>
</div>
<div class="go-next-step">
	<div class="clearfix">
		<p>总价: <strong id="order_amount">&yen;{$goods_info.amount}</strong></p>
		<a href="javascript:void($('#order_form').submit());" class="btn">提交订单</a>
	</div>
</div>